<!DOCTYPE html>

<html lang="zh-CN">
	<head>
		<meta charset="utf-8" />
	    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
		<title>首页</title>
		<!--<link rel="stylesheet" href="/static/css/bootstrap.min.css" />-->
		<link rel="stylesheet" href="/static/css/app.css" />
				<link rel="stylesheet" type="text/css" href="/static/css/bootstrap.css">
    <!--<link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/bootstrap-3.3.4.css">-->
	<link rel="stylesheet" href="/static/css/app1.css">
	</head>
	
	<body class="bg01">
		<header class="header">
			<h3>测试</h3>
		</header>
		
		<div class="wrapper">
			<div class="container-fluid">
				<div class="row fill-h">
					
			
					<div class="col-lg-5 fill-h">
						<div class="xpanel-wrapper xpanel-wrapper-2">
							<div class="xpanel">
								<!-- 省份地图 -->
								<div class="fill-h" id="provinces"></div>
							</div>
						</div>
						<div class="xpanel-wrapper xpanel-wrapper-2">
							<div class="xpanel">
								<!-- 城市地图 -->
								<div class="fill-h" id="cityMap"></div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<script type="text/javascript" src="/static/js/jquery-3.3.1.min.js"></script>
		<script type="text/javascript" src="/static/js/echarts.min.js"></script>
		<script type="text/javascript">
			$(function(){
				// 测试
				function drawProvinces(provinces,values)
				{
					var chart = echarts.init(document.getElementById("provinces"));
					var options = {
						title:{
							text:"测试图"
						},
						xAxis:{
							type:"value"
						},
						yAxis:{
							type:"category",
							data:provinces
						},
						series:{
							type:"bar",
							name:"provinces",
							data:values
						}
					}
					chart.setOption(options);
				}

				$.get("/main/provinces",result=>{
					console.log(result)
					drawProvinces(result['provinces'],result['counts'])
				})
				drawProvinces(["省份1","省份2"],[20,34])

            });


		</script>
	</body>
</html>